% Purpose: Test Texture Feature Function
% Date: 11/18/2012
% Author: R. Dutka
% Read standard image into MATLAB.
rgbImage = imread('./images/training/C/C-05.jpg');
% Display the original image.
subplot(3, 4, 1);
imshow(rgbImage);
title('Original RGB Image');
% Get segmented object pixels
BW = GetTrainingMask(rgbImage);
imshow(BW);
[rows columns] = size(BW);

R = zeros(rows*columns, 2);
index = 1;
for a=1:rows
   for b=1:columns
    if BW(a, b) == 1
        R(index,:) = [a, b];
        index = index + 1;
    end
   end
end
%concat matrix (remove zeros)
R( ~any(R,2), : ) = [];
flagNorm = 0;
[outputA, outputB] = Texture_Features(R, rgbImage, flagNorm);